package com.slz3.business.module.messageManagement.mesCreate.sync;

import com.slz3.business.frame.api.sms.SmsUtilMishang;
import com.slz3.business.frame.redis.Jedis;
import com.slz3.business.frame.redis.RK;
import com.slz3.business.module.drawManagement.draFreeLottery.domain.DraFreeLottery;

import java.util.Map;

public class DraFreeLotteryMessageToUserSync {
    public static void sync(String memberUuid,DraFreeLottery draFreeLottery){
        //获取用户信息
        String $uuid = RK.MEM_MEMBER__INFO__$UUID$.replace("$uuid", memberUuid);
        Map map = Jedis.db0.getMap($uuid);//用户信息
        if(map.get("phone")!=null){
            //发送短信
                try {
                    SmsUtilMishang.sendSms(map.get("phone").toString(),draFreeLottery.getSerGoodsDrawName());
                } catch (Exception e) {
                    e.printStackTrace();
                    System.out.println("-----中奖人活动提醒-----------失败");
                }
        }
    }

}
